function solve( nums ) {
    // write code here
    nums.sort((a,b)=>{
        let s1=`${a}${b}`;
        let s2=`${b}${a}`;
        console.log("s1",s1);
        console.log("s2",s2);
        return s2-s1;
    });
    return nums[0]?nums.join(""):"0"
}
var res=solve([1,23,45,4,6,7])
console.log(res);